package com.masblearn.decorator;

import com.masblearn.GameObject;

import java.awt.*;

public class RectDecorator extends GODecorator {


    public RectDecorator(GameObject object) {
        super(object);
    }

    @Override
    public void paint(Graphics g) {
        super.paint(g);

        Color c = g.getColor();
        g.setColor(Color.YELLOW);
        g.drawRect(super.go.x,super.go.y,super.go.getWidth(),super.go.getWidth());

        g.setColor(c);

    }

    @Override
    public int getWidth() {
        return super.go.getWidth();
    }

    @Override
    public int getHeight() {
        return super.go.getHeight();
    }
}
